<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>查询房型信息页面</title>
    <script charset="UTF-8" src="<%=request.getContextPath()%>/js/jquery-1.12.4.min.js"></script>
    <script src="<%=request.getContextPath()%>/js/formVerify.js"></script>
    <script src="<%=request.getContextPath()%>/js/formAjax.js"></script>
    <script src="<%=request.getContextPath()%>/js/redactVerify.js"></script>
    <link href="<%=request.getContextPath()%>/css/orderForm.css" type="text/css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/css/addClient.css" type="text/css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/css/redact.css" type="text/css" rel="stylesheet">
</head>
<body>
<div class="top_menu">
    <ul class="top_menu_ul">
        <li>
            <p><span class="menu_sp">Hotel Meigetsu </span>后台管理系统</p>
        </li>
        <li>
            <a href="#">房型管理</a>
        </li>
    </ul>
</div>
<div class="left_menu">
    <ul>
        <%--有权限--%>
        <c:if test="${administrator.memberJurisdiction > 0}">
            <li><a href="<%=request.getContextPath()%>/memberjsp/login.jsp">会员管理</a></li>
        </c:if>
        <c:if test="${administrator.memberJurisdiction == 0}">
            <li><a href="#" class="logs">会员管理</a></li>
        </c:if>
            <%--            //公开权限--%>
            <li><a href="<%=request.getContextPath()%>/cims.do?type=inquire">客户管理</a></li>
        <%--            //公开权限--%>
        <li><a href="<%=request.getContextPath()%>/orderForm?type=seek">订单管理</a></li>
        <%--            //公开权限--%>
        <li><a href="<%=request.getContextPath()%>/houseTypeWork">房型管理</a></li>
        <%--            //公开权限--%>
        <li><a href="<%=request.getContextPath()%>/keeper?type=inquire">房间管理</a></li>
        <%--有权限--%>
        <c:if test="${administrator.doBusinessJurisdiction > 0}">
            <li><a href="#">营业统计</a></li>
        </c:if>
        <c:if test="${administrator.doBusinessJurisdiction == 0}">
            <li><a href="#">营业统计</a></li>
        </c:if>
        <%--有权限--%>
        <c:if test="${administrator.financeJurisdiction > 0}">
            <li><a href="#">财务报表</a></li>
        </c:if>
        <c:if test="${administrator.financeJurisdiction == 0}">
            <li><a href="#">财务报表</a></li>
        </c:if>
        <%--有权限--%>
        <c:if test="${administrator.logJurisdiction > 0}">
            <li><a href="<%=request.getContextPath()%>/log?type=inquiryLog">日志管理</a></li>
        </c:if>
        <c:if test="${administrator.logJurisdiction == 0}">
            <li><a href="#" class="logs">日志管理</a></li>
        </c:if>
        <%--有权限--%>
        <c:if test="${administrator.manageJurisdiction > 0}">
            <li><a href="<%=request.getContextPath()%>/administrator?type=inquire">管理权限</a></li>
        </c:if>
        <c:if test="${administrator.manageJurisdiction == 0}">
            <li><a href="#" class="logs">管理权限</a></li>
        </c:if>
        <script>
            $(function (){
                $(".logs").click(function (){
                    alert("您暂时没有权限，请联系上级开通权限");
                })
            })
        </script>
    </ul>
</div>
<div class="center_menu">
    <form method="post" action="<%=request.getContextPath()%>/houseTypeWork?type=houseTypeList">
    <input type="search" name="houseType" value="${houseType}"><input type="submit" value="查询">
    <a href="<%=request.getContextPath()%>/houseTypejsp/add.jsp">添加</a>
</form>
    <table class="menu_table" border="1" cellspacing="0" cellpadding="0" bordercolor="#F1F1F1">
        <thead>
        <tr>
            <td>房型id</td>
            <td>房型名称</td>
            <td>房型价格</td>
            <td>房型详情</td>
            <td>房型数量</td>
        </tr>
        </thead>

        <tbody>
        <%--    <c:if test="${empty pageBean.productList}">--%>
        <%--        <tr>--%>
        <%--            <td colspan="7">未查询到相关数据</td>--%>
        <%--        </tr>--%>
        <%--    </c:if>--%>

        <%--    <c:if test="${not empty pageBean.productList}">--%>
        <c:forEach var="pageBean" items="${pageBean.productList}" varStatus="status">
            <tr>
                <td>${pageBean.id}</td>
                <td>${pageBean.houseType}</td>
                <td>${pageBean.price}</td>
                <td>${pageBean.particulars}</td>
                <td>${pageBean.houseNum}</td>
                <td><a href="<%=request.getContextPath()%>/houseTypeWork?type=delete&houseType=${pageBean.houseType}">删除</a></td>
                <td><a href="<%=request.getContextPath()%>/houseTypejsp/revamp.jsp">修改</a></td>
            </tr>
        </c:forEach>
        <tr>
            <td colspan="5" class="page_p">
                <a href="<%=request.getContextPath()%>/houseTypeWork?current=1">首页</a>
                <a href="<%=request.getContextPath()%>/houseTypeWork?current=${pageBean.currPageNo+1}">下一页</a>
                <a href="<%=request.getContextPath()%>/houseTypeWork?current=${pageBean.currPageNo-1}">上一页</a>
                <a href="<%=request.getContextPath()%>/houseTypeWork?current=${pageBean.totalPageCount}">末页</a>
                <a>第${pageBean.currPageNo}页/共${pageBean.totalPageCount}页</a>
            </td>
        </tr>
        <%--    </c:if>--%>
        </tbody>
    </table></div>

</body>
</html>
